<?php

/**
 * CourseSelection
 * @property	int		$id
 * @property	string	$studentId
 * @property    string  $courseClassId
 * @property	string	$result
 * @property	string	$created
 * @property	string	$updated
 */
class CourseSelection extends Node
{
    public static function option() {
        return array(
            'table' => 'CourseSelection',
            'key' => 'id',
            'columns' => array(
                'id' => 'id',
                'studentId' => 'student_id',
                'courseClassId' => 'course_class_id',
                'result' => 'result',
                'created' => 'created',
                'updated' => 'updated',
                'attributeData' => 'attributes',
            ));
    }

    /**
     * @return CourseClass
     */
    public function courseClass() {
        return CourseClass::load($this->courseClassId);
    }

    /**
     * @return Student
     */
    public function student() {
        return Student::load($this->studentId);
    }

    public function remove() {
        $this->delete();
    }
}